package com.supermarket.manage.common.dto.stock.request;

import com.supermarket.manage.common.validation.CheckGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author Faxon
 * @version 1.0
 * @date 2020-03-16 19:09
 **/
@Data
@ApiModel("OutstockPageParams:出库单分页条件查询对象 数据对象")
public class OutstockPageParams implements Serializable {

    private static final long serialVersionUID = 5873241977568427945L;
    /**
     * 页码
     */
    @ApiModelProperty(value = "页码")
    @NotNull(message = "页码不能为空", groups = {CheckGroup.Page.class})
    private Integer page;

    /**
     * 每页条目数
     */
    @ApiModelProperty(value = "每页条目数")
    @NotNull(message = "每页条目数不能为空", groups = {CheckGroup.Page.class})
    private Integer size;

    /**
     * 客户id
     */
    @ApiModelProperty(value = "客户id")
    @NotBlank(message = "客户id不能为空", groups = {CheckGroup.Page.class, CheckGroup.Get.class})
    private String buyerId;

    /**
     * 经办人id
     */
    @ApiModelProperty(value = "经办人id")
    private Long operator;

    /**
     * 单据状态(0：未完成，1：已完成，)
     */
    @ApiModelProperty(value = "单据状态(0：未完成，1：已完成)")
    private Integer status;

    /**
     * 单据类型（0：销售出库，1：采购退货出库）
     */
    @ApiModelProperty(value = "后端处理，前端无需关注此字段")
    private Integer type;

    /**
     * 时间前缀
     */
    @ApiModelProperty(value = "时间前缀")
    private String beginTime;

    /**
     * 时间后缀
     */
    @ApiModelProperty(value = "时间后缀")
    private String endTime;
}
